﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using Tour.Linq.TourDBML;
/// <summary>
///BasePage 的摘要说明
/// </summary>
public abstract class BasePage :System.Web.UI.Page
{
    protected string _Message = String.Empty;

    protected string _ReturnUrl = String.Empty;

    protected static MyTourDataContext m_tourContext;

    public static MyTourDataContext TourContext
    {
        get
        {
            if (m_tourContext == null)
            {
                lock (new object())
                {
                    if (m_tourContext == null)
                    {
                        m_tourContext = new MyTourDataContext();
                    }
                }
            }
            return m_tourContext;
        }
    }

    protected override void OnPreRenderComplete(EventArgs e)
    {
        this.AlertMessage(_Message, _ReturnUrl);
        base.OnPreRenderComplete(e);
    }

    protected virtual bool CheckEnterInfo()
    {
        return true;
    }
}
